We obtain the following file in http://chandra.harvard.edu/photo/openFITS/casa.html

Cas A 0.5-1.5 keV (soft) Fits File [4.0 MB] --> casa_0.5-1.5keV.fits

Cas A 1.5-3.0 keV (medium) Fits File [4.0 MB] --> casa_1.5-3.0keV.fits

Cas A 4.0-6.0 keV (hard) Fits File [4.0 MB] --> casa_4.0-6.0keV.fits


In [1]:
from astropy.utils.data import download_file
soft = download_file('http://chandra.harvard.edu/photo/2009/casa/fits/casa_0.5-1.5keV.fits', cache=True)
medium = download_file('http://chandra.harvard.edu/photo/2009/casa/fits/casa_1.5-3.0keV.fits', cache=True)
hard = download_file('http://chandra.harvard.edu/photo/2009/casa/fits/casa_4.0-6.0keV.fits', cache=True)


Downloading http://chandra.harvard.edu/photo/2009/casa/fits/casa_0.5-1.5keV.fits [Done]
Downloading http://chandra.harvard.edu/photo/2009/casa/fits/casa_1.5-3.0keV.fits [Done]
Downloading http://chandra.harvard.edu/photo/2009/casa/fits/casa_4.0-6.0keV.fits [Done]

We want to map the colour with their energy:

"hard" X-ray --> blue

"medium" --> green

"soft" -- > red


In [2]:
import aplpy
aplpy.make_rgb_image((soft,medium,hard),'casa_rgb.png')


INFO:astropy:Red:
INFO: Red: [aplpy.rgb]
INFO
INFO:astropy:vmin =  0.000e+00 (auto)
INFO:astropy:vmax =  8.000e+01 (auto)
INFO:astropy:Green:
: vmin =  0.000e+00 (auto) [aplpy.rgb]
INFO: vmax =  8.000e+01 (auto) [aplpy.rgb]
INFO: Green: [aplpy.rgb]
INFO
INFO:astropy:vmin =  0.000e+00 (auto)
INFO:astropy:vmax =  1.470e+02 (auto)
INFO:astropy:Blue:
: vmin =  0.000e+00 (auto) [aplpy.rgb]
INFO: vmax =  1.470e+02 (auto) [aplpy.rgb]
INFO: Blue: [aplpy.rgb]
INFO
INFO:astropy:vmin =  0.000e+00 (auto)
INFO:astropy:vmax =  8.000e+00 (auto)
: vmin =  0.000e+00 (auto) [aplpy.rgb]
INFO: vmax =  8.000e+00 (auto) [aplpy.rgb]

In [3]:
from IPython.display import Image
Image(filename='casa_rgb.png')


Out[3]: